﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using com.eforceglobal.crux.views.Controls.Common;

public partial class Controls_Common_WaterMarkedTextBox : System.Web.UI.UserControl, IWaterMarkedTextBox
{
    
    protected void Page_Load(object sender, EventArgs e)
    {

    }


    

    #region IWaterMarkedTextBox Members

    public string Text
    {
        get
        {
            return txtWaterMarkedTextBox.Text;
        }
        set
        {
            txtWaterMarkedTextBox.Text = value;
        }
    }

    public string WaterMarkText
    {
        get
        {
            return ""; // txtWaterMarkedTextBoxWaterMark.WatermarkText;
        }
        set
        {
            //txtWaterMarkedTextBoxWaterMark.WatermarkText = value;
        }
    }

    public string ErrorText
    {
        get
        {
            return txtWaterMarkedTextBoxRequired.ErrorMessage;
        }
        set
        {
            txtWaterMarkedTextBoxRequired.ErrorMessage = value;
            txtWaterMarkedTextBoxEmailChecker.ErrorMessage = value;
            txtWaterMarkedTextBoxNumberChecker.ErrorMessage = value;
            txtWaterMarkedTextBoxZeroChecker.ErrorMessage = value;
            txtWaterMarkedTextBoxIntegerChecker.ErrorMessage = value;
        }
    }

    public string TextBoxCss
    {
        get
        {
            return txtWaterMarkedTextBox.CssClass;
        }
        set
        {
            txtWaterMarkedTextBox.CssClass = value;
        }
    }

    #endregion

    #region IWaterMarkedTextBox Members

    public bool CheckRange
    {
        get
        {
            return txtWaterMarkedTextBoxRangeChecker.Enabled;
        }
        set
        {
            txtWaterMarkedTextBoxRangeChecker.Enabled = value;
            txtWaterMarkedTextBoxRangeChecker.Visible = value;
        }
    }

    public string RangeMinValue
    {
        get
        {
            return txtWaterMarkedTextBoxRangeChecker.MinimumValue;
        }
        set
        {
            txtWaterMarkedTextBoxRangeChecker.MinimumValue = value;
        }
    }

    public string RangeMaxValue
    {
        get
        {
            return txtWaterMarkedTextBoxRangeChecker.MaximumValue;
        }
        set
        {
            txtWaterMarkedTextBoxRangeChecker.MaximumValue = value;
        }
    }

    public ValidationDataType RangeType
    {
        get
        {
            return txtWaterMarkedTextBoxRangeChecker.Type;
        }
        set
        {
            txtWaterMarkedTextBoxRangeChecker.Type = value;
        }
    }

    public string RangeErrorMessage
    {
        get
        {
            return txtWaterMarkedTextBoxRangeChecker.ErrorMessage;
        }
        set
        {
            txtWaterMarkedTextBoxRangeChecker.ErrorMessage = value;
        }
    }

    public bool Enabled
    {
        get
        {
            return txtWaterMarkedTextBox.Enabled;
        }
        set
        {
            txtWaterMarkedTextBox.Enabled = value;
        }
    }
    
    #endregion

    #region IWaterMarkedTextBox Members


    public bool ValueRequired
    {
        get
        {
            return txtWaterMarkedTextBoxRequired.Enabled;
        }
        set
        {
            txtWaterMarkedTextBoxRequired.Enabled = value;
        }
    }

    #endregion

    #region IWaterMarkedTextBox Members


    public string Width
    {
        get
        {
            return txtWaterMarkedTextBox.Width.ToString();
        }
        set
        {
            txtWaterMarkedTextBox.Width = Unit.Parse(value);
        }
    }

    #endregion

    #region IWaterMarkedTextBox Members


    public string TextMode
    {
        get
        {
            return txtWaterMarkedTextBox.TextMode.ToString();
        }
        set
        {
            txtWaterMarkedTextBox.TextMode = (TextBoxMode)Enum.Parse(typeof(TextBoxMode),value);
        }
    }

    public string Height
    {
        get
        {
            return txtWaterMarkedTextBox.Height.ToString();
        }
        set
        {
            txtWaterMarkedTextBox.Height = Unit.Parse(value);
        }
    }

    #endregion

    #region IWaterMarkedTextBox Members


    public int MaxLength
    {
        get
        {
            return txtWaterMarkedTextBox.MaxLength;
        }
        set
        {
            txtWaterMarkedTextBox.MaxLength = value;
        }
    }


    #endregion

    #region IWaterMarkedTextBox Members


    public bool CheckEmailFormat
    {
        get
        {
            return txtWaterMarkedTextBoxEmailChecker.Enabled;
        }
        set
        {
            txtWaterMarkedTextBoxEmailChecker.Enabled = value;
            txtWaterMarkedTextBoxEmailChecker.Visible = value;
        }
    }



    #endregion

    #region IWaterMarkedTextBox Members


    public string ValidationGroup
    {
        get
        {
            return txtWaterMarkedTextBox.ValidationGroup;
        }
        set
        {
            txtWaterMarkedTextBox.ValidationGroup = value;
        }
    }

    #endregion

    #region IWaterMarkedTextBox Members


    public bool CheckForNumbers
    {
        get
        {
            return txtWaterMarkedTextBoxNumberChecker.Enabled;
        }
        set
        {
            txtWaterMarkedTextBoxNumberChecker.Enabled = value;
            txtWaterMarkedTextBoxNumberChecker.Visible = value;
        }
    }

    #endregion

    #region IWaterMarkedTextBox Members


    public bool ReadOnly
    {
        get
        {
            return txtWaterMarkedTextBox.ReadOnly;
        }
        set
        {
            txtWaterMarkedTextBox.ReadOnly = value;
        }
    }

    #endregion

    #region IWaterMarkedTextBox Members

    public bool NotAllowZero
    {
        get
        {
            return txtWaterMarkedTextBoxZeroChecker.Enabled;
        }
        set
        {
            txtWaterMarkedTextBoxZeroChecker.Enabled = value;
            txtWaterMarkedTextBoxZeroChecker.Visible = value;
        }
    }

    #endregion

    #region IWaterMarkedTextBox Members


    public bool CheckForInteger  
    {
        get
        {
            return txtWaterMarkedTextBoxIntegerChecker.Enabled;
        }
        set
        {
            txtWaterMarkedTextBoxIntegerChecker.Enabled = value;
            txtWaterMarkedTextBoxIntegerChecker.Visible = value;
        }
    }

    #endregion

    #region IWaterMarkedTextBox Members


    public bool CheckRegularExpression
    {
        get
        {
            return txtWaterMarkedTextBoxRegularExpressionChecker.Enabled;
        }
        set
        {
            txtWaterMarkedTextBoxRegularExpressionChecker.Enabled = value;
            txtWaterMarkedTextBoxRegularExpressionChecker.Visible = value;
        }
    }

    public string ValidatorExpression
    {
        get
        {
            return txtWaterMarkedTextBoxRegularExpressionChecker.ValidationExpression;
        }
        set
        {
            txtWaterMarkedTextBoxRegularExpressionChecker.ValidationExpression = value;
        }
    }

    public string RegularExpressionErrorMessage
    {
        get
        {
            return txtWaterMarkedTextBoxRegularExpressionChecker.ErrorMessage;
        }
        set
        {
            txtWaterMarkedTextBoxRegularExpressionChecker.ErrorMessage = value;
        }
    }

    #endregion
}
